package com.homework.ab_if.test1;

public class Circle extends Shape {
  int radius;

  @Override
  void getArea() {
    System.out.println("面积为：" + (Math.PI * (radius * radius)));
  }

  @Override
  void getPer() {
    System.out.println("周长为：" + (2 * Math.PI * radius));
  }

  @Override
  void showAll() {
    getArea();
    getPer();
    getColor();
  }

  public Circle(String color, int radius) {
    super(color);
    this.radius = radius;
  }
}
